<template>
  <div>
    <form ref="searchForm" :model="params" inline :label-width="120" :label-colon="true">
    <FormItem label="农村ID">
      <Input v-model="params.fkRuralId" placeholder="请输入农村ID"/>
    </FormItem>
      <!--农村名称-->
      <FormItem label="农村名称">
        <Input v-model="params.rfRuralName" placeholder="请输入农村名称"/>
      </FormItem>
      <FormItem :label-width="0">
        <Button style="margin-right: 10px" type="primary" @click='publicGetData'>查询</Button>
        <Button type="primary" @click='publicUpdateData'>新增</Button>
      </FormItem>
    </Form>
    <Breadcrumb></Breadcrumb>
    <BaseTable ref="baseTable"
               :action="action.readruralPartyBranchPersonnelDistribute"
              :columns="columns"
              :public-btn="['view','update','delete']"
              @handleView="publicUpdateData"
              @handleUpdate="publicUpdateData"
              @handleRemove='publicRemoveData'>>
    </BaseTable>
    <Drawer :width="500"
            :draggable="true"
            :title="viewParams.title"
            :closable="false"
            v-model="viewParams.flag"
            @on-visible-change="publicVisibleChange">
      <ruralPartyBranchPersonnelDistributeUpdate :type="type"
                                                 :moduleId="id"
                                                 :idName="idName"
                                                 :key="isRefreshView"
                                                 @closeView="publicCloseView">
      </ruralPartyBranchPersonnelDistributeUpdate>
    </Drawer>
  </div>
</template>

<script>
import { tableMixin } from '@/mixin/index'
import columns from './ruralPartyBranchPersonnelDistribute_columns'
import API_KEY from '../../../api'

export default {
  mixins: [tableMixin],
  data () {
    return {
      columns, // 表格列字段
      params: { // 搜索条件
        rfRuralName: '',
        fkRuralId: ''
      },
      action: { // 接口API地址
        readruralPartyBranchPersonnelDistribute: API_KEY.ruralPartyBranchPersonnelDistribute.page, // 分页查询地址
        removeDataByKey: API_KEY.ruralPartyBranchPersonnelDistribute.curdRural // 删除
      },
      prefix: '农村党支部人员分布情况',
      idName: 'id', // 主键字段名
      id: '' // 主键值
    }
  },
  components: {
    ruralPartyBranchPersonnelDistributeUpdate: () => import('./ruralPartyBranchPersonnelDistributeUpdate')
  }
}
</script>

<style scoped lang="scss">
/deep/ .ivu-select-dropdown {
  color: #000 !important;
}
</style>
